<?php

class DefaultController extends Controller {

    public function actionIndex() {
        $this->layout = 'main_search';
        Yii::app()->clientScript->registerCssFile(WWW_URL . "css/css1/theme.css");
        Yii::app()->clientScript->registerCssFile(WWW_URL . "css/css1/base.css");
        Yii::app()->clientScript->registerCssFile(WWW_URL . "css/css1/search.css");

        //dump($random_keys); die;
        $criteria = new CDbCriteria();
        $User = User::model()->count();
        $randomNumber = (rand() % $User);
        $models = User::model()->with('profile')->findByPk($randomNumber);
        $this->render('index', compact('models'));
    }

}
